package com.angel.web.app;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.angel.core.base.JsonEntity;
import com.angel.core.util.JsonUtil;
import com.angel.health.BuzOpinion;
import com.angel.provider.app.BuzOpinionProvider;

/** 
* @author 作者姓名  cheng
* @version 
* 创建时间：2016年9月24日 上午10:44:26 
* 类说明 
*/
@Controller
@RequestMapping("/app/opinion")
public class AppOpinionController {
	
	@Autowired
	private BuzOpinionProvider boProvider;

	/**
	 * 新增反馈意见
	 * @param buzOpinion
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value="addOpinion",produces="application/json; charset=utf-8")
	public String addOpinion(BuzOpinion buzOpinion){
		int insert = boProvider.insert(buzOpinion);
		if(insert > 0){
			return JsonUtil.toJson(new JsonEntity("200", buzOpinion));
		}
		return JsonUtil.toJson(new JsonEntity("-1", "反馈失败！"));
	}
}
